-- GENERATED SPELL FOR [Scholomance Necromancer] --


function spell0_10477(pUnit, Event) --@Call of the Grave,n/a--
pUnit:FullCastSpellOnTarget(12020,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10477', 564, 1)
end

function spell1_10477(pUnit, Event) --@Corpse Explosion,n/a--
pUnit:FullCastSpellOnTarget(17616,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10477', 1500, 1)
end

function spell2_10477(pUnit, Event) --@Shadow Bolt Volley,n/a--
pUnit:FullCastSpellOnTarget(14887,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10477', 3000, 1)
end

function Sorts_10477(pUnit, Event)
local choix_sorts_10477 = math.random(0, 2)
if choix_sorts_10477 == 0 then
pUnit:RegisterEvent('spell0_10477', 1, 1)
end
if choix_sorts_10477 == 1 then
pUnit:RegisterEvent('spell1_10477', 1, 1)
end
if choix_sorts_10477 == 2 then
pUnit:RegisterEvent('spell2_10477', 1, 1)
end
end

function mob10477_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10477', math.random(1500, 3000), 1)
end

function mob10477_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10477_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10477_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10477, 1, 'mob10477_Action')
RegisterUnitEvent(10477, 2, 'mob10477_Leave')
RegisterUnitEvent(10477, 3, 'mob10477_Kill')
RegisterUnitEvent(10477, 4, 'mob10477_Die')
